package com.tencent.sr.iris.activity.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 *
 */
@AllArgsConstructor
@Getter
public enum ActivityStatusEnum {
    INIT(0, "初始化未发布状态"),
    PROGRESSING(1, "进行中"),
    SUSPEND(2, "暂停"),
    DELETED(3, "删除"),
    ;

    private final int code;
    private final String desc;

    public static ActivityStatusEnum getByCode(int code) {
        for (ActivityStatusEnum staff : ActivityStatusEnum.values()) {
            if (staff.getCode() == code) {
                return staff;
            }
        }
        return null;
    }
}
